Document use of features for `cfg` more prominently
authorAaron Turon <aturon@mozilla.com>
Tue, 22 Sep 2015 20:17:07 +0000 (13:17 -0700)
committerAaron Turon <aturon@mozilla.com>
Tue, 22 Sep 2015 20:17:53 +0000 (13:17 -0700)
src/doc/manifest.md

index 8b5d02e46b6f68579560e25f33821aacf48555e2..c79913587b802228e8b2ff80ce8b8e759797ba21 100644 (file)
@@ -258,7 +258,8 @@ codegen-units = 1
 
 Cargo supports **features** to allow expression of:
 
-* Optional dependencies, which enhance a package, but are not required
+* Conditional compilation options (usable through `cfg` attributes);
+* Optional dependencies, which enhance a package, but are not required;
 * Clusters of optional dependencies, such as "postgres", that would include the
   `postgres` package, the `postgres-macros` package, and possibly other packages
   (such as development-time mocking libraries, debugging tools, etc.)
@@ -277,6 +278,10 @@ name = "awesome"
 # feature listed in this manifest.
 default = ["jquery", "uglifier", "session"]
 
+# A feature with no dependencies is used mainly for conditional
+# compilation, like `#[cfg(feature = "go-faster")]`.
+go-faster = []
+
 # The "secure-password" feature depends on the bcrypt package.
 # This aliasing will allow people to talk about the feature in
 # a higher-level way and allow this package to add more